import { createSlice, PayloadAction } from "@reduxjs/toolkit";

const siteSlice = createSlice({
  name: "current-url",
  initialState: { currentSite: "https://react.dev" },
  reducers: {
    setCurrentSite(state, { payload }: PayloadAction<string>) {
      state.currentSite = payload;
    }
  }
});

export const { setCurrentSite } = siteSlice.actions;
export default siteSlice.reducer;
